<?php
session_start();
$idconta = $_SESSION["idConta"];

$control = new ContaController();


if(isset($_POST["btnCadAlbum"])) {
    $control->tratarRequisicao($_POST["acao"]);
}

?>

<h1>Cadastrar álbum</h1>

<form name="formNovaAlbum" method="post" action="">
    <input type="hidden" value="NOVO_ALBUM" name="acao" />
    <input type="hidden" value="<?=$idconta;?>" name="id" />
    Legenda: <input type="text" name="legenda" id="legenda" value=""/>
    <input type="submit" id="btnCadAlbum" name="btnCadAlbum" value="Inserir Álbum" class="inputButton"/>
</form>



<h1>Álbuns</h1>

<div class="galeria_fotos" >

    <? foreach ($control->listAlbunsPorIdConta($idconta) as $album) {?>
    <div class="img_galeria_fotos" style="float:left; margin-left:10px;">
        <img src="" width="140px" height="120px" alt="" /><br />
        <p align="center"><a href="?page=fotos&album=<?=$album["idAlbum"]?>"><?=$album["legenda"]?></a></p>
    </div>
    <?}?>

</div>


